/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Figuras;

/**
 *
 * @author Gustavo Canul Poot
 */
public class Rectangulo extends Cuadrilatero{

    public Rectangulo(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {
        super(x1, y1, x2, y2, x3, y3, x4, y4);
    }




    @Override
    public double area() {

        if(getDist()== getDist6() && getDist4()== getDist2() )
        {
            return getDist()*getDist2();
        }


        else
        {
            return 0.0;
        }



    }
    
}
